package com.hex.ds.hdtp.core.app.data.contrast.dto.request;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Package: com.hex.ds.hdtp.core.app.data.contrast.dto.request
 * @ClassName CrossDbContrastRunLogRequestDto
 * @Description: 跨库对比记录RequestDto对象
 * @Author: wz.li
 * @Date 2023/7/28 17:49
 * @Version v2.0.2
 **/
@Data
@Accessors(chain = true)
public class CrossDbContrastRunLogRequestDto {

    private String pkId;

    private String taskPkId;

    private String templatePkId;

    private String contrastType;

    private String dataRange;

    private String status;

    private Integer contrastTotal;

    private Integer contrastSuccessCount = 0;

    private Integer contrastFailCount = 0;

    private String startTime;

    private String endTime;

    public void setContrastType(String contrastType) {
        this.contrastType = contrastType.equals("Y") ? "cycle" : "manual";
    }

    public void setDataRange(String dataRange) {
        this.dataRange = dataRange.equals("Y") ? "sample" : "total";
    }
}
